BODY_MAX_SIZE
BODY_MAX_SIZE = 1048576
Logical representation of a mail message with all its data and related functions
$app : \rcube
Instance of framework class.
$storage : \rcube_storage
Instance of storage class
$mime : \rcube_mime
Instance of mime class
get_part_content(string $mime_id, resource $fp = null, bool $skip_charset_conv = false, int $max_bytes, bool $formatted = true) : string
Get content of a specific part of this message
string | $mime_id | Part MIME-ID |
resource | $fp | File pointer to save the message part |
bool | $skip_charset_conv | Disables charset conversion |
int | $max_bytes | Only read this number of bytes |
bool | $formatted | Enables formatting of text/* parts bodies |
Part content
get_part_body(string $mime_id, bool $formatted = false, int $max_bytes, mixed $mode = null) : string|bool
Get content of a specific part of this message
string | $mime_id | Part ID |
bool | $formatted | Enables formatting of text/* parts bodies |
int | $max_bytes | Only return/read this number of bytes |
mixed | $mode | NULL to return a string, -1 to print body or file pointer to save the body into |
Part content or operation status
None found |
format_part_body(string $body, \rcube_message_part $part, string $default_charset = null) : string
Format text message part for display
string | $body | Part body |
\rcube_message_part | $part | Part object |
string | $default_charset | Fallback charset if part charset is not specified |
Formatted body
None found |
has_html_part(bool $enriched = false, \rcube_message_part $part = null) : bool
Determine if the message contains a HTML part. This must to be a real part not an attachment (or its part)
bool | $enriched | Enables checking for text/enriched parts too |
\rcube_message_part | $part | Reference to the part if found |
True if a HTML is available, False if not
None found |
has_text_part(\rcube_message_part $part = null) : bool
Determine if the message contains a text/plain part. This must to be a real part not an attachment (or its part)
\rcube_message_part | $part | Reference to the part if found |
True if a plain text part is available, False if not
None found |
first_html_part(\rcube_message_part $part = null, bool $enriched = false) : string|null
Return the first HTML part of this message
\rcube_message_part | $part | Reference to the part if found |
bool | $enriched | Enables checking for text/enriched parts too |
HTML message part content
None found |
first_text_part(\rcube_message_part $part = null, bool $strict = false) : string|null
Return the first text part of this message.
If there's no text/plain part but $strict=true and text/html part exists, it will be returned in text/plain format.
\rcube_message_part | $part | Reference to the part if found |
bool | $strict | Check only text/plain parts |
Plain text message/part content
None found |
None found |
is_attachment(\rcube_message_part $part) : bool
Checks if part of the message is an attachment (or part of it)
\rcube_message_part | $part | Message part |
True if the part is an attachment part
None found |
get_multipart_encrypted_part() : \rcube_message_part
In a multipart/encrypted encrypted message, find the encrypted message payload part.
None found |
tnef_decode(\rcube_message_part $part) : \rcube_message_part[]
Decode a Microsoft Outlook TNEF part (winmail.dat)
\rcube_message_part | $part | Message part to decode |
List of message parts extracted from TNEF
None found |
uu_decode(\rcube_message_part $part) : \rcube_message_part[]
Parse message body for UUencoded attachments bodies
\rcube_message_part | $part | Message part to decode |
List of message parts extracted from the file
None found |
unfold_flowed(mixed $text) : mixed
Deprecated methods (to be removed)
mixed | $text |
None found |
format_flowed(mixed $text, mixed $length = 72) : mixed
mixed | $text | |
mixed | $length |
None found |
fix_attachment_name(string $name, \rcube_message_part $part) : string
Fix attachment name encoding if needed and possible
string | $name | Attachment name |
\rcube_message_part | $part | Message part |
Fixed attachment name
None found |
parse_structure(\rcube_message_part $structure, bool $recursive = false) : mixed
Read the message structure returned by the IMAP server and build flat lists of content parts and attachments
\rcube_message_part | $structure | Message structure node |
bool | $recursive | True when called recursively |
None found |
get_mime_numbers(\rcube_message_part $part) : mixed
Fill a flat array with references to all parts, indexed by part numbers
\rcube_message_part | $part | Message body structure |
None found |
add_part(\rcube_message_part $part, string $type = null) : mixed
Add a part to object parts array(s) (with context check)
\rcube_message_part | $part | Message part |
string | $type | Part type (inline/attachment) |
None found |
check_context(\rcube_message_part $part) : bool
Check if specified part belongs to the current context
\rcube_message_part | $part | Message part |
True if the part belongs to the current context, False otherwise
None found |